home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
editor
/
cedrexx.lha
/
cedrexx_scripts
/
CommentStrip.ced
< prev
next >
Wrap
Text File
|
1996-05-07
|
1KB
|
50 lines
/************************************************************\
** $VER: CommentStrip.ced 1.0 **
** By : James Allen (AKA $LiNg$HoT) **
** Date: April 95' **
** Rel : May 96' **
** Description : **
** **
** - Strips all of the 'C' style comments from the file. **
** - Starts stripping from the current cursor position. **
** - Press a key to abort at any time. **
** **
\************************************************************/
address 'rexx_ced'
OPTIONS RESULTS
CEDTOFRONT
SEARCH FOR '/*'
do while( RESULT ~= 0 )
found = 1
IF RESULT ~= 0 then
Do
MARK
SEARCH FOR '*/'
RIGHT
RIGHT
CUT
End
/* Allow user to ABORT at any time */
LASTKEY
/* Check for a keystroke (~= -1) which is not an key release (< 128) */
IF (RESULT ~= -1) & (WORD( RESULT, 1 ) < 128) THEN
DO
CEDTOFRONT
OKAY1 "Comment Strip Aborted!"
EXIT
END
SEARCH FOR '/*'
End
If found=1 then
OKAY1 "Striped Comments.."
Else
OKAY1 "No comments found!"
Endif